

#import "YMTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface YMTableViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconImg;
@property (weak, nonatomic) IBOutlet UIImageView *jxImg;
@property (weak, nonatomic) IBOutlet UIImageView *buyOneImg;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *heftLab;
@property (weak, nonatomic) IBOutlet UILabel *priceLab;
@property (weak, nonatomic) IBOutlet UILabel *originPriceLab;
@property (weak, nonatomic) IBOutlet UIButton *subBtn;
@property (weak, nonatomic) IBOutlet UIButton *addBtn;
@property (weak, nonatomic) IBOutlet UILabel *countLab;

//cellmodel
@end

@implementation YMTableViewCell

- (void)setProducts:(NSDictionary *)products
{
    _products = products;
    [self.iconImg sd_setImageWithURL:[NSURL URLWithString:products[@"img"]]];
    self.nameLab.text = products[@"name"];
    self.heftLab.text = products[@"specifics"];
    self.priceLab.text = products[@"price"];
    self.originPriceLab.text = products[@"market_price"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)addBtnClick:(id)sender
{
    NSLog(@"商品数量增加");
}
- (IBAction)subBtnClick:(id)sender
{
    NSLog(@"商品信息减少");
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
